range: Remove GtkScale special casing
authorTimm Bäder <mail@baedert.org>
Fri, 23 Feb 2018 06:59:10 +0000 (07:59 +0100)
committerTimm Bäder <mail@baedert.org>
Fri, 23 Feb 2018 09:47:05 +0000 (10:47 +0100)
This is unnecessary these days due to the negative margins of the
slider.

gtk/gtkrange.c

index 5eff55328dfa6fb4e41b2d9196cf81cd373c5596..4d7a8bb4f17b7f457d6e8cecd5b6f4435b3768d9 100644 (file)
@@ -2597,13 +2597,6 @@ gtk_range_compute_slider_position (GtkRange     *range,
       top = 0;
       bottom = top + trough_height;
 
-      /* Scale slider half extends over the trough edge */
-      if (GTK_IS_SCALE (range))
-        {
-          top -= min_slider_size / 2;
-          bottom += min_slider_size / 2;
-        }
-
       /* slider height is the fraction (page_size /
        * total_adjustment_range) times the trough height in pixels
        */
@@ -2648,13 +2641,6 @@ gtk_range_compute_slider_position (GtkRange     *range,
       left = 0;
       right = left + trough_width;
 
-      /* Scale slider half extends over the trough edge */
-      if (GTK_IS_SCALE (range))
-        {
-          left -= min_slider_size / 2;
-          right += min_slider_size / 2;
-        }
-
       /* slider width is the fraction (page_size /
        * total_adjustment_range) times the trough width in pixels
        */